From fa6aa0c4a4b046794a6e3fd47bc1b81e1c12783c Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 7 Apr 2006 09:57:36 +0100 Subject: [PATCH] Do not accept empty definition of __XEN_INTERFACE_VERSION__ in xen-compat.h. It leads to building a broken kernel image where the kernel sources end up using an unexpected interface version. In the case of Linux, the kernel expects to use the new sched_op() hypercall but ends up calling the legacy hypercall -- this breaks poll, reboot, and save/restore. A more acceptable patch would be to detect the empty definition in xen-compat.h and give a reasonable #error message to fail the build: the current error message is confusing. Signed-off-by: Keir Fraser --- xen/include/public/xen-compat.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xen/include/public/xen-compat.h b/xen/include/public/xen-compat.h index 4ef17bbaa8..c4f235095d 100644 --- a/xen/include/public/xen-compat.h +++ b/xen/include/public/xen-compat.h @@ -14,11 +14,8 @@ #if defined(__XEN__) /* Xen is built with matching headers and implements the latest interface. */ #define __XEN_INTERFACE_VERSION__ __XEN_LATEST_INTERFACE_VERSION__ -#elif (__XEN_INTERFACE_VERSION__ - 0) == 0 +#elif !defined(__XEN_INTERFACE_VERSION__) /* Guests which do not specify a version get the legacy interface. */ -#ifdef __XEN_INTERFACE_VERSION__ -#undef __XEN_INTERFACE_VERSION__ -#endif #define __XEN_INTERFACE_VERSION__ 0x00000000 #endif -- 2.30.2